package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(255);not null"`
	Password string `gorm:"type:varchar(255);not null"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int;not null"`
	Rid int `gorm:"type:int;not null"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(255);not null"`
}
type RoleNode struct {
	gorm.Model
	Nid int `gorm:"type:int;not null"`
	Rid int `gorm:"type:int;not null"`
}
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(255);not null"`
}
type WareHouse struct {
	gorm.Model
	WareHouseName string `gorm:"type:varchar(255);not null"`
	WareHouseCode string `gorm:"type:varchar(255);not null"`
}
type Order struct {
	gorm.Model
	Wid        int    `gorm:"type:int;not null"`
	OrderName  string `gorm:"type:varchar(255);not null"`
	OrderCode  string `gorm:"type:varchar(255);not null"`
	OrderNum   int    `gorm:"type:int;not null"`
	OrderPrice int    `gorm:"type:int;not null"`
}
type OrderList struct {
	OrderId       int    `gorm:"type:int;not null"`
	WareHouseName string `gorm:"type:varchar(255);not null"`
	WareHouseCode string `gorm:"type:varchar(255);not null"`
	OrderName     string `gorm:"type:varchar(255);not null"`
	OrderCode     string `gorm:"type:varchar(255);not null"`
	OrderNum      int    `gorm:"type:int;not null"`
	OrderPrice    int    `gorm:"type:int;not null"`
}
